

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>试卷管理</title>
    <#include "/common/link.ftl">

</head>
<body class="hold-transition skin-black sidebar-mini">
<div class="wrapper">
    <#include "/common/navbar.ftl">
    <#assign currentMenu="exam"/>
    <#include "/common/menu.ftl">
    <div class="content-wrapper">
        <section class="content-header">
            <h1>试卷预览</h1>
        </section>
        <section class="content">
            <div class="box" style="padding: 10px">
                <div class="row">

                    <div class="col-md-offset-4 col-md-8">
                        <h1 class="col-md-offset-1">${exam.title}</h1>
                    </div>
                    <div class="col-md-12">
                        <div class="panel panel-default">
                            <div class="panel-body">
                                <div class="col-md-4">考试时间：${exam.examMinute}分钟 </div>
                                <div class="col-md-4">考试总分：${exam.totalScore} 分</div>
                            </div>
                        </div>
                    </div>
                </div>

                <#assign totalSimScore=0>
                <#assign totalMulScore=0>
                <#assign totalJugScore=0>

                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3>一、单选题（共<span id="single"></span>分）</h3>
                    </div>
                    <#list exam.questions as q>
                        <#if q.type == 1>
                    <div class="panel-body">
                        <p>${q_index+1}.${q.title}?<span>（${q.score}分）</span></p>
                        <#list q.answers as a>
                        <p>${a.title}</p>
                        </#list>
                        <div style="color:red">正确答案：
                            <#list q.answers as a>
                                ${a.showJudgeRight()!}
                            </#list>
                        </div>
                        <#assign totalSimScore+=q.score>
                    </div>
                    </#if>
                    </#list>
                    <div class="panel-heading">
                        <h3>二、多选题（共<span id="multi"></span>分）</h3>
                    </div>
                    <#list exam.questions as q>
                        <#if q.type == 2>
                            <div class="panel-body">
                                <p>${q_index+1}.${q.title}?<span>（${q.score}分）</span></p>
                                <#list q.answers as a>
                                    <p>${a.title}</p>
                                </#list>
                                <div style="color:red">正确答案：
                                    <#list q.answers as a>
                                        ${a.showJudgeRight()!}
                                    </#list>
                                </div>
                            </div>
                            <#assign totalMulScore+=q.score>
                        </#if>
                    </#list>
                    <div class="panel-heading">
                        <h3>三、判断题（共<span id="jud"></span>分）</h3>
                    </div>
                    <#list exam.questions as q>
                        <#if q.type == 3>
                            <div class="panel-body">
                                ${q_index+1}.${q.title}?<span>（${q.score}分）</span>

                                <div style="color:red">正确答案：${(q.quesJudgeRight?string('对','错'))!}
                                </div>
                            </div>
                            <#assign totalJugScore+=q.score>
                        </#if>
                    </#list>
                    <div class="panel-heading">
                </div>
            </div>
            </div>
        </section>
    </div>
    <#include "/common/footer.ftl">
</div>
<script>
    $('#single').html(${totalSimScore})
    $('#multi').html(${totalMulScore})
    $('#jud').html(${totalJugScore})
</script>
</body>

</html>
